/*
 * File Created: 2019-11-30 16:19:19
 * Author: 余保林 (yubaolin6@outlook.com)
 * Desc: 兑换码管理相关接口
 * Last Modified: 2019-11-30 16:19:21
 * Modified By: 余保林 (yubaolin6@outlook.com>)
 */

import request from '@/utils/request'
import Qs from 'qs'

export function redeemCodeQuery(params) {
  return request({
    url: `/platform/privilege/product/exchange/query?${Qs.stringify(params)}`,
    method: 'post'
  })
}

export function redeemCodeAdd(data) {
  return request.post('/platform/privilege/product/exchange/generate', data)
}

export function redeemCodeAll() {
  return request.get('/privileges/exchange_code')
}
